#!/bin/bash
#防止 haproxy 停止而 keepalived 不切换的情况
if ! `pidof haproxy &> /dev/null`; then
    /etc/rc.d/init.d/haproxy  start
fi
sleep 2
if ! `pidof haproxy &> /dev/null`; then
    /etc/rc.d/init.d/keepalived stop
fi
